package com.Iron.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.Param;

public interface UserMapper {

    @Update("update account set money=money+#{money} where username = #{accountName}")
    public void incrMoney(@Param("accountName") String accountName, @Param("money") Integer money);

    @Update("update account set money=money-#{money} where username = #{accountName}")
    public void decrMoney(@Param("accountName") String accountName, @Param("money") Integer money);

    @Select("select count(*) from account")
    public Integer findNum();


}
